<template>
    <div class="learn-examination">
        <el-tabs v-model="activeName" class="demo-tabs">
            <el-tab-pane label="考试记录" name="examSore">
                <ExamList ref="examListRef1" :recordType="recordType" />
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script setup>
import ExamList from '@/components/ExamList/index.vue'
import { getDicts } from "@/api/system/dict/data.js"

const activeName = ref('examSore')
const sys_paper_type = ref([])
const examListRef1 = ref(undefined)
const recordType = ref(undefined)

onMounted(async () => {
    let dictRes = await getDicts('sys_paper_type')
    sys_paper_type.value = dictRes.data
    recordType.value = sys_paper_type.value.find(item => item.dictLabel == '正式考试')?.dictCode
    console.log('onMounted: ', recordType.value)
    // examListRef1.value.getMockRecord()
})
</script>
<style scoped lang="scss">
.learn-examination {
    padding: 25px 0;

    .demo-tabs {
        height: 100%;

        :deep(.el-tabs__content) {
            height: calc(100% - 40px);
            padding: 51px 42px;

            .el-tab-pane {
                height: 100%;
            }
        }
    }

    .year-tags {
        font-size: 16px;
        margin-bottom: 50px;

        .year-tags-label {
            margin-right: 34px;
            color: #333;
            cursor: pointer;
        }

        .year-tags-item {
            margin-right: 36px;
            color: #666;
            cursor: pointer;

            &.active {
                color: #3872A9;
                font-weight: bold;
            }
        }
    }
}
</style>